﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.Data;
using ICeFramework.Common.DataLayer;
using ICeFramework.Common.DataLayer.Interfaces;

namespace ICeFramework.DataAccess.Remote
{
    // NOTE: If you change the interface name "IService1" here, you must also update the reference to "IService1" in App.config.
    [ServiceContract]
    public interface IRemoteDataAccess
    {
        [DataMember]
        IDataAccessService DataAccessService { get; }

        [OperationContract(Name = "Fill")]
        DataTable Fill(DataTable table, EntityFilter filter, EntityOrder order, IDbTransaction transaction);

        [OperationContract(Name = "PagedFill")]
        DataTable Fill(DataTable table, EntityFilter filter, EntityOrder order, int pageIndex, int pageSize, out long totalRowsCount, IDbTransaction transaction);

        [OperationContract(Name = "FillSP")]
        DataTable Fill(DataTable table, StoredProcedureDefinition spDefinition, EntityOrder order, IDbTransaction transaction);

        [OperationContract(Name = "Count")]
        int Count(DataTable table, EntityFilter filter);

        [OperationContract(Name = "Update")]
        DataTable Update(DataTable table, byte[] rowArray, byte[] columnArray, IDbTransaction transaction);
    }
}
